package cn.byapps.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.byapps.json.EasyUIJson;
import cn.byapps.service.UserService;


@Controller
@RequestMapping("/")
public class UserController {

	@Autowired
	private UserService userService;
	
	@RequestMapping("list")
	@ResponseBody 
	//page=1&rows=10&sort=id&order=asc 
	public EasyUIJson getJson(int page,int rows,String sort,String order){
		System.out.println("sort = " + sort + order);
			return userService.getJson(page, rows);
	}
}
